﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Diagnostics;
using SqlSugar;
using Consul;

namespace AspectCore.Services
{
    public class TestService : ITestService
    {
        private readonly SqlSugarClient _sqlSugarClient;

        public TestService()
        {
        }
        public void Test1(string msg)
        {
            Debug.WriteLine($"void->{msg}");
        }

        public async Task Test2(string msg)
        {
            //var sql = _sqlSugarClient.GetConnection("dev").Queryable<TestModel, TestModel1>((a, b) => a.Age == b.Age).AS("dev.Test").AS<TestModel1>("sit.Test").ToSql();
            //_sqlSugarClient.CurrentConnectionConfig.IsAutoCloseConnection = true;
            //_sqlSugarClient.Aop.DataExecuting = (value, filter) =>
            //{

            //};
            //var agent = new ConsulClient();

            await Task.CompletedTask;
        }

        public async Task<string> Test3(string msg)
        {
            return await Task.FromResult(msg);
        }
    }
}
